<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><title>R: Waterflow Measurements of Kootenay River in Libby and Newgate</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="R.css">
</head><body>

<table width="100%" summary="page for kootenay"><tr><td>kootenay</td><td align="right">R Documentation</td></tr></table>

<h2>Waterflow Measurements of Kootenay River in Libby and Newgate</h2>

<h3>Description</h3>


<p>The original data set is the waterflow in January of the Kootenay
river, measured at two locations, namely, Libby (Montana) and Newgate
(British Columbia) for 13 consecutive years, 1931&ndash;1943.
</p>
<p>The data set is of mostly interest because it has been used as example
in innumerous didactical situations about robust regression.
To this end, one number (in observation 4) has been modified from the
original data from originally 44.9 to 15.7 (here).
</p>


<h3>Usage</h3>

<pre>data(kootenay)</pre>


<h3>Format</h3>


<p>A data frame with 13 observations on the following 2 variables.
</p>

<dl>
<dt><code>Libby</code></dt><dd><p>a numeric vector</p>
</dd>
<dt><code>Newgate</code></dt><dd><p>a numeric vector</p>
</dd>
</dl>



<h3>Details</h3>


<p>The original (unmodified) version of the data is easily obtainable
as <code>kootenay0</code> from the examples; other modified versions of the
data sets are also used in different places, see the examples below.
</p>


<h3>Source</h3>


<p>Original Data, p.58f of
Ezekiel and Fox (1959),
<EM>Methods of Correlation and Regression Analysis</EM>. Wiley, N.Y.
</p>


<h3>References</h3>


<p>Hampel, F., Ronchetti, E., Rousseeuw, P. and Stahel, W.  (1986)
<EM>Robust Statistics: The Approach Based on Influence Functions</EM>;
Wiley, N.Y.
</p>
<p>Rousseeuw, P. J. and Leroy, A. M. (1987)
<EM>Robust Regression &amp; Outlier Detection</EM>, Wiley, N. Y.
</p>


<h3>Examples</h3>

<pre>
data(kootenay)
plot(kootenay, main = "'kootenay' data")
points(kootenay[4,], col = 2, cex =2, pch = 3)

abline(lm   (Newgate ~ Libby, data = kootenay), col = "pink")
abline(lmrob(Newgate ~ Libby, data = kootenay), col = "blue")

## The original version of Ezekiel &amp; Fox:
kootenay0 &lt;- kootenay
kootenay0[4, "Newgate"] &lt;- 44.9
plot(kootenay0, main = "'kootenay0': the original data")
abline(lm   (Newgate ~ Libby, data = kootenay0), col = "pink")
abline(lmrob(Newgate ~ Libby, data = kootenay0), col = "blue")

## The version with "milder" outlier -- Hampel et al., p.310
kootenay2 &lt;- kootenay0
kootenay2[4, "Libby"] &lt;- 20.0 # instead of 77.6
plot(kootenay2, main = "The 'kootenay2' data",
     xlim = range(kootenay[,"Libby"]))
points(kootenay2[4,], col = 2, cex =2, pch = 3)
abline(lm   (Newgate ~ Libby, data = kootenay2), col = "pink")
abline(lmrob(Newgate ~ Libby, data = kootenay2), col = "blue")
</pre>


</body></html>
